<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <title>定位</title>
    <link rel="stylesheet" href="/Public/Home/css/location.css">
    <!--不识别数字为手机-->
<meta name="format-detection" content="telephone=no, email=no"/>
<!--通用js-->
<?php if(isset($signPackage) && !empty($signPackage)){ ?>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js?v=201704270010"></script>
<?php } ?>
<script type="text/javascript" src="/Public/Home/js/require.js"></script>
<script type="text/javascript" src="/Public/Home/js/baseLoading.js?v=201705240001"></script>
<script src="/Public/Home/js/jquery.min.js" ></script>
<script src="/Public/Home/js/pincode-input.js" ></script>
<script src="/Public/Home/js/parabola.js" ></script>
<script src="/Public/Home/js/lazyload/jquery.lazyload.min.js"></script>
<script type="text/javascript">
    _global.isLogin = !!"<?php echo $wx_member_id; ?>";
	var isWxShareDiy = typeof yc_share_diy === "undefined" ? false : yc_share_diy;
	var yc_wx_shareImgPath = "";
	<?php if(isset($weixin_logo) && !empty($weixin_logo)){ ?>
		yc_wx_shareImgPath = "/Uploads/<?php echo ($weixin_logo["image"]); ?>";
	<?php } ?>
    var yc_pass_arr = {'local_id':"<?php echo I('local_id',1);?>",'top_local_id':"<?php echo I('top_local_id',1);?>"};
	if(parseInt(yc_pass_arr["local_id"]) == 21){
		_global.isStopSell = true;
	}
    <?php if(isset($signPackage) && !empty($signPackage)){ ?>
        _global.isWeiXinLoad = true;
        var isEnableLocation = typeof yc_wx_location === "undefined" ? false : yc_wx_location;
        var yc_wx_options = {
            "enableLocation" : isEnableLocation,
            "refuseCallback" : function(){},
            "mapCallback" : function(){},
            "config" : {
                debug: false,
                appId: '<?php echo $signPackage["appId"];?>',
                timestamp: '<?php echo $signPackage["timestamp"];?>',
                nonceStr: '<?php echo $signPackage["nonceStr"];?>',
                signature: '<?php echo $signPackage["signature"];?>',
                jsApiList: [
                    'checkJsApi'
                ]
            }
        };
        var isInHeader = typeof yc_wx_useInHeader === "undefined" ? true : yc_wx_useInHeader;
        if(isInHeader){
            wxAutoConfig(yc_wx_options);
        }
    <?php } ?>
</script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=<?php echo ($ak); ?>"></script>
</head>
<body>
<div class="location-area">
    <ul>
        <li><a href="javascript:location.reload();" class="autoSearch">查找周边已开通门店</a></li>
        <li><h5>当前所在区域</h5></li>
        <li>
            <div class="content-block">
                <input id="address_detail"
                       value="<?php echo $data['province'] ? $data['province'].'/'.$data['city'].'/'.$data['area'] : '';?>"
                       type="text" readonly unselectable="on" placeholder="省/市/区"/>
                <input id="addressValue" type="hidden" disabled="disabled"/>
            </div>
            <a href="javascript:void(0);">手动选择</a>
        </li>
        <li><h5>该区域所有门店</h5></li>
        <li>
            <div class="area-shop-list"></div>
        </li>
    </ul>
</div>
<!-- 定位弹窗 -->
<div class="alert-popup locationChoice">
    <p>http://m.yichen666.com 想使用您的地理位置，是否允许？</p>
    <p><a href="javascript:void(0);" class="cancel">取消</a><a href="javascript:void(0);" class="confirm">允许</a></p>
</div>
<script>
    var source = "<?php echo ($source); ?>";
    var wx_config ={
        appId : '<?php echo $signPackage["appId"];?>',
        timestamp: '<?php echo $signPackage["timestamp"];?>',
        nonceStr: '<?php echo $signPackage["nonceStr"];?>',
        signature: '<?php echo $signPackage["signature"];?>'
    };
</script>
<script type="text/javascript" src="/Public/Home/js/location.js?v=201703010009"></script>
</body>
</html>